#! /bin/bash
#source /etc/profile
#. /etc/init.d/functions

SOURCE_DIR="$1"
SOURCE_FILENAME="$2"
DEST_DIR="$3"
DEST_FILENAME="$4"

if [ -z ${SOURCE_DIR} ]
 then
 echo "No Source dir!"
 exit 0
fi

if [ -z ${SOURCE_FILENAME} ]
then
 echo "No Source fileName!"
 exit 0
fi
if [ -z ${DEST_DIR} ]
then 
 echo "No Dest Dir!"
 exit 0
fi
if [ -z ${DEST_FILENAME} ]
then 
 echo "No Dest fileName specified, use source filename as default."
 DEST_FILENAME=${SOURCE_FILENAME}
fi
cp ${SOURCE_DIR}${SOURCE_FILENAME} ${DEST_DIR}${DEST_FILENAME}
echo "copy finish ^_^"
